package com.neu.flashmall.ms.entity;

import java.io.Serializable;

import com.neu.common.valid.AddGroup;
import com.neu.common.valid.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 
 * @TableName sys_menu
 */
@Data
public class SysMenu implements Serializable ,Cloneable{
    /**
     * 
     */
    @NotNull(message = "更新权限信息的时候id不能为NULL",groups = {UpdateGroup.class})
    @Null(message = "添加的时候id必须为NULL",groups = {AddGroup.class})
    private Long id;

    /**
     * 
     */
    @NotNull(message = "更新和添加权限信息的时候parentId不能为NULL",groups = {UpdateGroup.class, AddGroup.class})
    private Long parentId;

    /**
     * 级别
     */
    @NotNull(message = "更新和添加权限信息的时候level不能为NULL",groups = {UpdateGroup.class, AddGroup.class})
    private Integer level;

    /**
     * 菜单名称
     */
    @NotBlank(message = "更新和添加权限信息的时候权限名称不能为空", groups = {UpdateGroup.class, AddGroup.class})
    private String name;

    /**
     * 
     */
    private String url;

    /**
     * 
     */
    private String icon;

    @NotBlank(message = "更新和添加权限信息的时候property不能为空", groups = {UpdateGroup.class, AddGroup.class})
    private String property;

    private static final long serialVersionUID = 1L;



    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}